<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>{block name="title"}{/block}</title>
    <!-- plugins:css -->
    <link rel="stylesheet" href="/static/star_admin/vendors/iconfonts/mdi/css/materialdesignicons.min.css">
    <link rel="stylesheet" href="/static/star_admin/vendors/css/vendor.bundle.base.css">
    <link rel="stylesheet" href="/static/star_admin/vendors/css/vendor.bundle.addons.css">
    <link rel="stylesheet" href="/static/star_admin/css/style.css">
    <link rel="shortcut icon" href="/static/star_admin/images/favicon.png" />

    <link href="/static/plugins/floatPanel/dist/floatPanel.min.css" rel="stylesheet" type="text/css"/>
</head>


<body>
<div class="container-scroller">
    <!-- partial:partials/_navbar.html -->
    {include file="lib/top_bar" /}
    <!-- partial -->
    <div class="container-fluid page-body-wrapper">
        <!-- partial:partials/_sidebar.html -->
        {include file="lib/left_nav" /}
        <!-- partial -->
        <div class="main-panel">
            <!--<div class="content-wrapper">
                <div class="row purchace-popup">
                    <div class="col-12">
                      <span class="d-block d-md-flex align-items-center">
                        <p>Like what you see? Check out our premium version for more.</p>
                        <a class="btn ml-auto download-button d-none d-md-block" href="https://github.com/BootstrapDash/StarAdmin-Free-Bootstrap-Admin-Template" target="_blank">Download Free Version</a>
                        <a class="btn purchase-button mt-4 mt-md-0" href="https://www.bootstrapdash.com/product/star-admin-pro/" target="_blank">Upgrade To Pro</a>
                        <i class="mdi mdi-close popup-dismiss d-none d-md-block"></i>
                      </span>
                    </div>
                </div>
            </div>-->
            <div class="content-wrapper" style="height: 50%; padding:5px 0 0;">
                <iframe id="child_frame" width="100%" height="100%" frameborder="0" scrolling="no">
                </iframe>
            </div>

            {include file="lib/footer" /}
            <!-- content-wrapper ends -->
            <!-- partial:partials/_footer.html -->

            <!-- partial -->
        </div>
        <!-- main-panel ends -->
    </div>
    <!-- page-body-wrapper ends -->
</div>
<!-- container-scroller -->

<!-- plugins:js -->
<script src="/static/star_admin/vendors/js/vendor.bundle.base.js"></script>
<script src="/static/star_admin/vendors/js/vendor.bundle.addons.js"></script>
<script src="/static/star_admin/js/off-canvas.js"></script>
<script src="/static/star_admin/js/misc.js"></script>
<script src="/static/star_admin/js/dashboard.js"></script>

<script src="/static/plugins/floatPanel/dist/floatPanel.min.js" ></script>


<script>
    // 重定向菜单到iframe子页面并让菜单的显示跟随变化
    $('.menu-page').click(function() {
        var url = $(this).attr('page');
        $('.nav-link').removeClass('active');
        $(this).addClass('active');
        $('#child_frame').attr("src", url);

    });

    // 警示弹框重写
    function alert2(msg, header) {
        if (typeof header) {
            header = '提示！';
        }
        //根据需要,创建浮动框时可以传入配置项
        var panel = FloatPanel('panel', {
            closeBtn: true,
            floatHeight: 10,
            header:{
                enable:true,
                content:header,
            },
            body:{
                enable:true,
                content:msg,
            },
            footer:{
                enable:false,
                content:'',
            }
        });
        panel.show();
    }

    // 清除缓存
    $('#clear_cache').click(function() {
        var url = $(this).attr('data-href');
        $.ajax({
            type: 'POST',
            url: url,
            success:function (res) {
                if (res.code) {
                    alert2('清除成功！');
                } else {
                    alert2('清除失败！');
                }
            }
        });
    });


</script>
<!-- End custom js for this page-->
</body>

</html>